UNSEEN FRUIT
https://gyazo.com/a9758216ec3aac6b344d190bc86c6e4a
二個目のフルーツを見つけたらスイッチを押してクリア。
ロボ操作方法
0: Move right
1: Move down
2: Move left
3: Move up
4: Sleep
5 Use action (enter)
レジスタ
r1: 見たもの
r2: RAM確認用
code:unseen_fruit
const add 0
const add_ri 64
const add_ii 192
const sub 1
const sub_ri 65
const jeq 32
const jeq_ri 96
const jeq_ii 224
const jlt 34
const jlte 35
const sw 16
const sw_ri 80
const lw 17
const lw_ri 81
const call 8
const ret 9
const r0 0
const r1 1
const r2 2
const r3 3
const r4 4
const r5 5
const sp 5
const sp_offset 4
const counter 6
const input 7
const output 7
const right 0
const down 1
const left 2
const up 3
const sleep 4
const action 5
const conveyor 92
# idou
add_ii
right
0
output
add_ii
right
0
output
add_ii
up
0
output
add_ii
up
0
output
add_ii
up
0
output
add_ii
up
0
output
add_ii
left
0
output
add_ii
left
0
output
add_ii
up
0
output
add_ii
up
0
output
add_ii
up
0
output
# watch
label main
# watch conveyor
add
input
r0
r1
# skip if conveyor
jeq_ri
r1
conveyor
skip
lw
r1
r0
r2
# after_report if r2 == 0
jeq
r2
r0
after_report
# report
# => move right(0)
# => action
# = move up(3)
add_ii
right
r0
output
add_ii
action
r0
output
add_ii
up
r0
output
label break
jeq
r0
r0
break
label after_report
add_ri
r2
1
r2
sw
r1
r0
r2
label skip
add_ii
sleep
r0
output
jeq
r0
r0
main